import 'package:json_annotation/json_annotation.dart';

part 'user_membership.g.dart';

@JsonSerializable()
class UserMembership extends Object {
  @JsonKey(name: 'id')
  int id;

  @JsonKey(name: 'name')
  String name;

  @JsonKey(name: 'avatar')
  String avatar;

  @JsonKey(name: 'big_avatar')
  String bigAvatar;

  @JsonKey(name: 'discount')
  String discount;

  @JsonKey(name: 'price')
  String price;

  UserMembership(
    this.id,
    this.name,
    this.avatar,
    this.bigAvatar,
    this.discount,
    this.price,
  );

  factory UserMembership.fromJson(Map<String, dynamic> srcJson) =>
      _$UserMembershipFromJson(srcJson);

  Map<String, dynamic> toJson() {
    return _$UserMembershipToJson(this);
  }
}
